<template>
  <v-app>
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
    <Toast ref="toast" />
    <Loading ref="loading" />
    <Layer ref="layer" style="z-index: 100000" />
  </v-app>
</template>

<script>
import Toast from './components/toast/index.vue'
import Loading from './components/loading/index.vue'
import Layer from './components/layer/index.vue'
export default {
  name: 'App',
  components: {
    Toast,
    Loading,
    Layer
  },
  data: () => ({}),
  async created () {
    await this.$store.dispatch('getUserinfo').then()
  }
}
</script>

<style scoped></style>
